<input type="hidden" name="mostrasumary" value="<h:messages />" />
<fieldset style="background-color:rgb(222,222,222)" id="fieldMsgErro">
	<div id="divMsg">
		<span id="tituloMsgErro" style="height:25px; background-color:rgb(222,222,222); vertical-align:middle; padding:3px; width:100%">
			<h:messages id="errorMessageText" errorClass="MsgErros" infoClass="MsgInfo" warnClass="MsgWarn"/>
		</span>
	</div>
</fieldset>
<script type="text/javascript">
	document.getElementById('fieldMsgErro').style.display = (document.forms[0].mostrasumary.value == ''?'none':'block');
</script>